﻿using DouCat.Blog.Application.HelloWorld;
using Microsoft.AspNetCore.Mvc;
using System;
using Volo.Abp.AspNetCore.Mvc;
using static DouCat.Blog.Domain.Shared.DouCatBlogConsts;

namespace DouCat.Blog.HttpApi.Controllers
{
    [ApiController]
    [Route("[controller]")]
    [ApiExplorerSettings(GroupName =Grouping.GroupName_v3)]
    public class HelloWorldController: MyBaseController
    {
        private readonly IHelloWorldService _helloWorldService;

        public HelloWorldController(IHelloWorldService helloWorldService)
        {
            this._helloWorldService = helloWorldService;
        }

        /// <summary>
        /// 你好世界
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public virtual string HelloWorld()
        {
            return this._helloWorldService.HelloWorld();
        }

        [HttpGet]
        [Route("Exception")]
        public string Exception()
        {
            throw new NotImplementedException("这是一个未实现的异常接口");
        }
    }
}
